home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / alangsbs.zip / VIDORG.SRC < prev    next >
Text File  |  1989-12-12  |  786b  |  20 lines

  1. ;---------------------------------------------------------------
  2. ;   VidOrg  --  Returns origin segment of video buffer
  3. ;   Last update 3/8/89
  4. ;
  5. ;   1 entry point:
  6. ;
  7. ;   VidOrg:
  8. ;      Caller must pass:
  9. ;      AL : Code specifying display adapter type
  10. ;      VidOrg returns the buffer origin segment in AX
  11. ;---------------------------------------------------------------
  12.  
  13. VidOrg     PROC
  14.            xor  AH,AH         ; Zero AH
  15.            mov  DI,AX         ; Copy AX (with code in AL) into DI
  16.            shl  DI,1          ; Multiply code by 2 to act as word index
  17.            lea  BX,OriginTbl  ; Load address of origin table into BX
  18.            mov  AX,[BX+DI]    ; Index into table using code as index
  19.            ret                ; Done; go home!
  20. VidOrg     ENDP